{extend name="../../public/admin"}
{block name="title"}登入页面{/block}
{block name="css"}

<link rel="stylesheet" href="__PUBLIC__/admin/css/sys.login.css">
<!--动画-->
<script type='text/javascript' src='__PUBLIC__/public/background/jquery.particleground.min.js'></script>
<script type='text/javascript' src='__PUBLIC__/public/background/demo.js'></script>
{/block}
{block name="body"}
<div class="container-fluid">

    <div id="particles"></div>
    <div class="form">
        <h4 class="text-center title"><strong style="font-size: 20px;">{$Think.config.title}</strong></h4>
        <form action="{:url('sys/is')}" method="post" id="form">
            <div class="form-group input-group bg-label">
                <label class="input-group-addon">&nbsp;&nbsp;&nbsp;{:lang('账号')}</label>
                <input type="text" name="account" class="form-control" datatype="s">
            </div>
            <div class="form-group input-group bg-label">
                <label class="input-group-addon">&nbsp;&nbsp;&nbsp;{:lang('密码')}</label>
                <input type="password" name="password" class="form-control" datatype="s">
            </div>
            <div class="form-group input-group bg-label validform-error">
                <label class="input-group-addon">{:lang('验证码')}</label>
                <input type="text" name="validate" class="form-control" datatype="s5-5" errormsg=" " nullmsg=" " sucmsg=" ">
                <label class="input-group-addon" style="padding: 0;">
                    <img src="{:captcha_src()}" alt="" width="143" onclick="$(this).attr('src',$(this).attr('src')+'#'+1)">
                </label>
            </div>
            <div class="form-group text-center">
               <button class="btn btn-info">{:lang('立即登入')}</button>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="js"}
<link rel="stylesheet" href="__PUBLIC__\public\validform\style.css">
<script src="__PUBLIC__/public/validform/Validform_v5.3.2_min.js"></script>
<script>
    $(function () {
        $('#form').Validform({
            tiptype:4,
            ajaxPost:true,
            beforeSubmit:function () {
                var index = layer.load(1)
            },
            callback:function (da) {
                layer.closeAll();
                if(da == 1){
                    location.href="{:url('index/index')}";
                }else{
                    $('.validform-error img').click();
                    layer.msg(da,{icon:2});
                }
            }
        });
    });

</script>
{/block}